package com.fzx.config.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

@RestController
@RefreshScope
public class ConfigController {
    @Value("${wkk01}")
    private Integer wkk01;

    @Value("${wkk02}")
    private Integer wkk02;

    @GetMapping("config/getConfig")
    public Map getConfig() {
        Map<String, Integer> map = new HashMap<>();
        map.put("wkk01", wkk01);
        map.put("wkk02", wkk02);
        return map;
    }
}
